#ifndef WF_POLYLINEEQUIDISTANT_H
#define WF_POLYLINEEQUIDISTANT_H

#include "pf_previewactioninterface.h"
#include "pf_modification.h"
#include "gui_export.h"

/**
 * This action class can handle user events to move entities.
 *
 */
class GUI_EXPORT WF_PolylineEquidistant : public PF_PreviewActionInterface {
	Q_OBJECT
public:
	/**
	 * Action States.
	 */
	enum Status {
		ChooseEntity			/**< Choosing the original polyline. */
	};

public:
	WF_PolylineEquidistant(PF_Container& container,
						PF_GraphicView& graphicView);
	~WF_PolylineEquidistant() {}
	virtual LX_Define::ActionType rtti() {
		return LX_Define::ActionPolylineEquidistant;
	}

	static QAction* createGUIAction(LX_Define::ActionType /*type*/, QObject* /*parent*/);

	virtual void init(int status=0);
	
	virtual void trigger();

	virtual void mouseMoveEvent(PF_MouseEvent* e);
	virtual void mouseReleaseEvent(PF_MouseEvent* e);
	
	virtual void updateMouseButtonHints();
	virtual void updateMouseCursor();
	virtual void updateToolBar();
	virtual void showOptions();
	virtual void hideOptions();

	void setDist(double d) {
		dist = d;
	}

	double getDist() {
		return dist;
	}

	void setNumber(int n) {
		number = n;
	}

	int getNumber() {
		return number;
	}

	bool makeContour();

private:
	PF_Entity* originalEntity;
	PF_Vector targetPoint;
	double dist;
	int number;
	bool bRightSide;
};

#endif
